<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
<jsp:directive.page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />
<jsp:directive.page import="java.util.ArrayList, java.util.Iterator, cult.ticketing.bean.*" />
<jsp:output omit-xml-declaration="no" doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />
<jsp:include page="templates/include_header.html" />

<jsp:text><![CDATA[<html>
<head>
<title>Cult Ticketing System</title>
<!--<script type="text/javascript">
    function buyTicket() {
      document.getElementById("movieList").todo.value = "purchase";
      document.getElementById("frmGuest").submit();

    }
</script>-->

<link href="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/css/style.css" rel="stylesheet" type="text/css" />
<link href="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/css/movie.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container">
]]></jsp:text>
<jsp:include page="templates/include_menu.jsp" />
<jsp:include page="templates/search.jsp" />

<jsp:text><![CDATA[<div id="main">
        <div id="content">
        <div id="head_image">
        	<div id="slogan"><strong>Cult Ticketing System -- Now Showing</strong><br />
       	    </div>
            <div id="under_slogan_text">
                <br /><br /><br /><br />

            </div>
          </div>

         <div id="left">]]></jsp:text>
            <jsp:include page="templates/login.jsp" />
            <jsp:include page="templates/calendar.jsp" />
         <jsp:text><![CDATA[</div>

         <div id="right">
            <h1>Schedule Items</h1>
            <p>&nbsp;</p>]]></jsp:text>

            <jsp:text><![CDATA[
            <form name="itemList" id="itemList" method="post" action="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/index.do">
            <input type="hidden" name="todo" id="todo" value="showSeatingPlan" />
            <table class="item">
            <tbody>]]></jsp:text>
            <jsp:scriptlet>
              ArrayList&lt;ScheduleItem&gt; scheduleItems = (ArrayList&lt;ScheduleItem&gt;)request.getAttribute("scheduleItems");
              Iterator&lt;ScheduleItem&gt; it = scheduleItems.iterator();
              while (it.hasNext() != false) {
                pageContext.setAttribute("scheduleItem", (ScheduleItem)it.next());
            </jsp:scriptlet>
            <jsp:useBean id="scheduleItem" type="cult.ticketing.bean.ScheduleItem" scope="page" />

            <jsp:text><![CDATA[
                <tr>
                    <td>
                        <input type="radio" name="scheduleItemId" value="]]></jsp:text><jsp:getProperty name="scheduleItem" property="id" /><jsp:text><![CDATA[" />
                    </td>

                    <td>]]></jsp:text>
                    <jsp:getProperty name="scheduleItem" property="showTime" />
                    <jsp:text><![CDATA[</td>

                    <td>Movie House ]]></jsp:text>
                    <jsp:getProperty name="scheduleItem" property="houseId" />
                    <jsp:text><![CDATA[</td>

                    
                    <td>HKD ]]></jsp:text>
                    <jsp:getProperty name="scheduleItem" property="price" />
                    <jsp:text><![CDATA[</td>
                </tr>]]></jsp:text>

                <jsp:scriptlet>
                    pageContext.removeAttribute("item");
                }
                </jsp:scriptlet>
                <jsp:text><![CDATA[</tbody>
                <tfoot>               
                        <input type="submit" value="Buy Ticket" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'"/>
                </tfoot>


            </table>

            </form>]]></jsp:text>

        <jsp:text><![CDATA[
        </div>
	</div>
</div>
</div>]]></jsp:text>
<jsp:include page="templates/include_footer.html" />
<jsp:text><![CDATA[</body>
</html>
]]></jsp:text>
</jsp:root>
